package com.hejing.接口interface.接口案例02;

/**
 * ClassName: InterfaceTest
 * Package: com.hejing.接口interface.接口案例02
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-30 20:46
 * @Version: 1.0
 */
public class InterfaceTest {
    public static void main(String[] args) {
        CompareableCircle c1 = new CompareableCircle(2);
        CompareableCircle c2 = new CompareableCircle(2);

        int compareValue = c1.compareTo(c2);
        if(compareValue > 0){
            System.out.println("c1对象大");
        }else if (compareValue == 0){
            System.out.println("c1对象和c2对象一样大");
        } else{
            System.out.println("c2对象大");
        }
    }
}


















